import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import Antd from "ant-design-vue";
import "ant-design-vue/dist/antd.less";
import "@/common/css/reset.css";
import { createPinia } from "pinia";
// pinia持久化缓存插件
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
import SvgIcon from '@/components/SvgIcon/SvgIcon.vue';
import WaterMark from 'am-watermark'
import 'am-watermark/dist/style.css'
import './permission';

const app = createApp(App);

const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);

app.use(WaterMark);
app.component("svg-icon", SvgIcon);

const requireContext = require.context('./assets/icons', false, /\.svg$/);
requireContext.keys().forEach(requireContext);

app.use(pinia);
app.use(Antd);
app.use(router);
app.mount('#app');
